package io.renren.modules.home.controller;

import io.renren.common.utils.R;
import io.renren.modules.home.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author cyx
 * @date 2022/2/28-18:11
 */
@RestController
@RequestMapping("/home")
public class HomeController {
    @Autowired
    private HomeService homeService;
    @GetMapping("/getStatistics")
    public R getStatistics(){
        Map<String,Object> statistics = homeService.getStatistics();
        return R.ok().put("statistics",statistics);
    }
}
